from django import forms
from common.utils.custom_form_field import JsonField


class GetKeyMapperForm(forms.Form):
    page_id = forms.CharField(required=False)


class MerchantListForm(forms.Form):
    size = forms.CharField(required=False)
    page = forms.CharField(required=False)


class MerchantCreateForm(forms.Form):
    merchant_name = forms.CharField(max_length=255)
    desc = forms.CharField(max_length=1024)


class RoleCreateForm(forms.Form):
    role_name = forms.CharField(max_length=64)
    desc = forms.CharField(max_length=2048)
    supervisor_id = forms.IntegerField()
    perm = JsonField()


class RoleListForm(forms.Form):
    sort_by = forms.CharField(required=False)
